package com.lottery.game.core.model.request.register;

import com.lottery.game.common.BaseObject;

import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel(description="注册请求")
public class RegisterV2Request extends BaseObject {

	@ApiModelProperty(dataType = "String",name="username",  required = true, notes = "用户名-即用户呢称",example = "帝国之王")
	@Length(min = 3, max = 8, message="用户名必须是3~8位")
	@NotEmpty(message = "用户名不能为空")
	private String username;

	@ApiModelProperty(dataType = "String",name="password",  required = true, notes = "密码为6-18位数字字母下划线",example = "12345678")
	@NotEmpty(message = "密码不能为空")
	@Length(min = 6, max = 18, message="密码必须是6~18位数字和字母的组合")
	private String password;

	@ApiModelProperty(dataType = "String",name="phone", required = true, notes = "手机号",example = "15348304228")
	@NotEmpty(message = "手机号不能为空")
	@Pattern(regexp="^((13[0-9])|(17[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$", message="手机号格式不正确")
	private String phone;

	@ApiModelProperty(dataType = "String",name="code",  required = true, notes = "验证码",example = "5209")
	@NotEmpty(message = "验证码不能为空")
	private String code;

	@ApiModelProperty(dataType = "String",name="token", required = true, notes = "短信验证码验证TOKEN",example = "发送短信后返回的短信TOKEN: eyJzaWduIjoiNGU2MDE1ZGVmMjY2N2NkOWQyMzgxZGIzZjcyMjRiNDIiLCJ0aW1lc3RhbXAiOiIxNTU1Mjk5MDYyNTE5In0")
	@NotEmpty(message = "短信验证码验证TOKEN不能为空")
	private String token;

	@ApiModelProperty(dataType = "String",name="QQ", notes = "qq号",example = "123456")
	private String qq;

	@ApiModelProperty(dataType = "String", name = "introducer", notes = "介绍人")
	private String introducer;

}
